<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ include file="/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>广东工业大学招生办后台管理</title>
 <script src="${ctx}/js/jquery-page.js" type="text/javascript"></script>
	<script src="${ctx }/js/table.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="${ctx}/js/checkbox.js"></script>
<script language="javascript">
function delcfm(){
	if (confirm("确定删除？")){
				return true;
		}else{
			return false;
	}
}
function del(){
	if(confirm("确定删除？")){
		var ids = document.getElementsByName("ids");
		var id = "";
		for(var i = 0; i < ids.length; i++){
			if(ids[i].checked){
				id=id+ids[i].value+",";  
			}
		}
		$.post("${ctx}/admin/special-article-admin!delete.action", "ids="+id ,function callback(text){
	           		$('#mainForm').submit();
	     	});
    }
}
function modify(){
	document.getElementById('m1').style.display = "none";
	document.getElementById('m2').style.display = "block";
	return false;
}
</script>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
select{
	width:300px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
#m2{
	display:none;
}
-->
</style>
</head>

<body>
<form action="${ctx }/admin/special-article-admin.action" method="post">
  <fieldset>
    <legend>请选择专题</legend>
		<select name="spec_id" >
		
		<option value="${id }">${special.name}</option>
		<s:iterator value="specialList">
			<option value="${id}">${name}</option>
		</s:iterator>
		</select>
	<input type="submit" value="搜索" />
	
  </fieldset>
</form>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="${ctx }/images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1">专题文章列表</span></td>
              </tr>
            </table></td>
            <td><div align="right"><span class="STYLE1">
              <a href="special-article-admin!input.action?type=0" style="text-decoration:none;color:#fff"><img src="${ctx }/images/add.gif" width="10" height="10"  /> 添加   &nbsp; </a>
			  <a href="javascript:;" style="text-decoration:none;color:#fff" onClick="return del()" ><img src="${ctx }/images/del.gif" width="10" height="10" /> 批量删除    &nbsp;</a>
			  </span><span class="STYLE1"> &nbsp;</span></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
	<form id="mainForm" action="${ctx }/admin/special-article-admin.action" method="post">
	<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
	<input type="hidden" name="spec_id" value="${spec_id}"/>
	<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
      <tr>
        <td width="5%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10"><input type="checkbox" name="select" id="selectAll" onclick="this.value=check(this.form.select)" />全选</span></div></td>
        <td width="5%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">序号</span></div></td>
        <td width="25%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">文章标题</span></div></td>
		<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">是否放至相关链接导读</span></div></td>
		<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">是否置顶</span></div></td>
		<td width="10%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">发布人</span></div></td>
        <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">发布时间</span></div></td>
		<td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">操作</span></div></td>
      </tr>
       <s:iterator value="page.result" status="status">
      <tr>
        <td height="20" bgcolor="#FFFFFF"><div align="center">
          <input type="checkbox" class="select" name="ids" id="select" value="${id}"/>
        </div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE6"><div align="center"><span class="STYLE19">${status.index+1 +(page.pageNo-1)*page.pageSize}</span></div></td>
        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${title }</div></td>
		<td height="20" bgcolor="#FFFFFF" class="STYLE19">
			<div align="center" id="m1">
			<s:if test="tag==1">是</s:if>
			<s:else>
			否
			</s:else></div>
		</td>
		<td height="20" bgcolor="#FFFFFF" class="STYLE19">
			<div align="center" id="m1">
			<s:if test="hightop==1">
			是
			</s:if>
			<s:else>
			否
			</s:else>			</div>
		</td>
		<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">
        <s:if test='inputBy=="penggege"'>
        root
        </s:if><s:else>
        ${inputBy }
        </s:else>
        </div></td>

        <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center">${inputTime}</div></td>
        <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE21"><a href="${ctx}/admin/special-article-admin!delete.action?ids=${id}&spec_id=${spec_id}" onClick="return delcfm()">删除</a> | <a href="special-article-admin!input.action?id=${id}&type=0">编辑 </a></div></td>
      </tr>
      </s:iterator>
    </table>
	</form>
	</td>
  </tr>
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="33%"><div align="left"><span class="STYLE22">&nbsp;&nbsp;&nbsp;&nbsp;共有<strong> ${page.totalCount}</strong> 条记录，当前第<strong> ${page.pageNo}</strong> 页，共 <strong>${page.totalPages}</strong> 页</span></div></td>
        <td width="67%"><table width="312" border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
            <td width="49"><div align="center"><a href="javascript:jumpPage(1)">首页</a></div></td>
            <s:if test="page.hasPre"><td width="49"><div align="center"><a href="javascript:jumpPage(${page.prePage})">上一页</a></div></td></s:if>
            <s:if test="page.hasNext"><td width="49"><div align="center"><a href="javascript:jumpPage(${page.nextPage})">下一页</a></div></td></s:if>
            <td width="49"><div align="center"><a href="javascript:jumpPage(${page.totalPages})">尾页</a></div></td>
            
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

</body>
</html>
